package com.yeswater.multithread.chapter3.test3_1;

/**
 * author : yeswater
 * date : 2023/10/23
 */

public class Run3_3_1 {

    public static final ThreadLocal tl = new ThreadLocal();

    public static final InheritableThreadLocal itl = new InheritableThreadLocal();

    public static void main(String[] args) {
        if (tl.get() == null) {
            System.out.println(" not put value ");
            tl.set(" set value ");
        }
        System.out.println(tl.get());
        System.out.println(tl.get());
        if (itl.get() == null) {
            System.out.println(" not put value ");
            itl.set(" set value ");
        }
    }
}
